home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************
- * ファイルセレクタ構造体
- *************************************************************************/
-
- #ifndef _SDKFS_H
- #define _SDKFS_H
-
- #include <dos.h>
- #include <sidefs.h>
- #include <siev.h>
- #include <sisbar.h>
- #include <SDK/blkdlg.h>
-
- #define _SDKFS_VER "2.01b"
-
- typedef struct _fndat_t
- {
- struct _fndat_t *next;
- struct find_t buf; /* look <dos.h> */
- int no;
- int flag;
- int mark;
- } FNDAT_T;
-
- typedef struct
- {
- unsigned att; /* 属性 */
- unsigned stt; /* ステータス */
- int err; /* エラー */
-
- BLKDLG_T *dlg; /* ダイアログ用ワーク */
- FRAME_T fr;
- FRAME_T frDrv; /* ドライブセレクタ枠 */
- FRAME_T frFl; /* ファイル表示枠 */
- EV_T *ev; /* イベント用 */
- EV_T *evDrv; /* ドライブ選択用イベント */
- EV_T *evFn; /* ファイル名 */
- char *title; /* タイトル */
- SB_T *sb; /* スクロールバー用 */
-
- char buf[256]; /* 入力ファイル名 */
-
- int drv; /* ドライブ [A:0 [B:1 */
- char whare[256]; /* ディレクトリ */
- char *wild; /* ワイルドカード */
- int sort; /* ソートタイプ */
-
- int numFn; /* ファイル数(ディイレクリも含む) */
- FNDAT_T *fnTop; /* ディレクトリバッファ先頭 */
- int numMat; /* マッチしたファイル数 */
- FNDAT_T **fnMat; /* マッチしたファイル名 */
- int posDspTop; /* 表示するファイル名の先頭 */
- int posMark;
- } FILESEL_T;
-
- #define FSCD_CRTSAVE (0x20) /* カレントディレクトリ状態保存 */
-
- extern FILESEL_T *FileSel_open(void);
- extern void FileSel_close( FILESEL_T *fs );
- extern int FileSel_start( FILESEL_T *fs );
- extern int FileSel_setTitle( FILESEL_T *fs, CONST char *form, ... );
- extern int FileSel_setWild( FILESEL_T *fs, CONST char *wild );
- extern char *FileSel_getFn( FILESEL_T *fs );
-
- #define FSATT_DIR (0x10)
- #define FSATT_VOL (0x08)
- #define FSATT_SYS (0x04)
- #define FSATT_ARC (0x02)
- #define FSATT_RO (0x01)
-
- #define FSSORT_OFF (0x00) /* ソートなし */
- #define FSSORT_FILE (0x01) /* ファイル名 */
- #define FSSORT_SUB (0x02) /* 拡張子 */
- #define FSSORT_DATE (0x03) /* 日付 */
- #define FSSORT_SIZE (0x04) /* サイズ */
- #define FSSORT_RVS (0x80) /* 昇順/降順 */
- #define FSSORT_DIRTOP (0x00) /* ディレクトリ先頭 */
- #define FSSORT_DIRLAST (0x20) /* ディレクトリ最後 */
- #define FSSORT_DIROFF (0x40) /* ディレクトリ */
- #define FSSORT_DIRBIT (FSSORT_DIRLAST|FSSORT_DIROFF)
-
- #define FS_ISSORT_DIRTOP(_sort) (((_sort)&FSSORT_DIRBIT) == FSSORT_DIRTOP)
- #define FS_ISSORT_DIRLAST(_sort) (((_sort)&FSSORT_DIRBIT) == FSSORT_DIRLAST)
- #define FS_ISSORT_DIROFF(_sort) (((_sort)&FSSORT_DIRBIT) == FSSORT_DIROFF)
-
- #endif
-